<link href="<?php echo base_url(JS_PUBLIC);?>/fileuploader/fileuploader.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<?php echo base_url(JS_PUBLIC);?>/fileuploader/fileuploader.js" ></script>
<script type="text/javascript" src="<?php echo base_url(JS_PUBLIC);?>/ckeditor/ckeditor.js" ></script>
<form method="post" class="form-horizontal">
    <fieldset>
        <legend><?php echo isset($data) ? 'Sửa' : 'Thêm mới';?> trang</legend>
        <?php if (isset($error)):?>
            <div class="alert alert-error"><?php echo $error;?></div>
        <?php else :?>
            <?php if (isset($msg)):?><div class="alert alert-success"><?php echo $msg;?></div><?php endif;?>
        <?php endif;?>
        <div class="control-group">
            <label class="control-label" for="title">Tiêu đề trang</label>
            <div class="controls">
                <input type="text" class="input-xxlarge" name="title" id="title" value="<?php echo @$data->title;?>" />
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="title">Loại trang</label>
            <div class="controls">
                <?php echo form_dropdown('type', page_type(), @$data->type, 'class="input-xxlarge" id="type" ')?>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="intro">Mô tả ngắn gọn</label>
            <div class="controls">
                <textarea name="intro" class="input-xxlarge" rows="5"><?php echo @$data->intro;?></textarea>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="description">Mô tả chi tiết</label>
            <div class="controls">
                <textarea name="content" class="input-xxlarge ckeditor" rows="5"><?php echo @$data->content;?></textarea>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <?php echo form_hidden('id', @$data->id); ?>
                <input type="submit" class="btn btn-primary" value="Lưu lại" />
                <input type="reset" class="btn" value="Bỏ qua" />
            </div>
        </div>
    </fieldset>
</form>